export function getDate(data) {
    const date = new Date(data);
    return {
        Year: date.getFullYear(),
        Month: date.getMonth()+1,
        Day: date.getDate(),
    };
}
export function getBlob(data) {
    const BASE_64 = ";base64,";
    let parts;
    let contentType;
    let raw;
    if (data.indexOf(BASE_64) === -1) {
        parts = data.split(',');
        contentType = parts[0].split(':')[1];
        raw = decodeURIComponent(parts[1]);
        return new Blob([raw], {type: contentType});
    }
    parts = data.split(BASE_64);
    contentType = parts[0].split(':')[1];
    raw = window.atob(parts[1]);
    let rawLength = raw.length;
    let uInt8Array = new Uint8Array(rawLength);
    for (let i = 0; i < rawLength; ++i) {
        uInt8Array[i] = raw.charCodeAt(i);
    }
    return new Blob([uInt8Array], {type: contentType});
}